import { createApp } from 'vue'
import ElementPlus from 'element-plus'

import 'element-plus/dist/index.css'
import App from './App.vue'
import { router } from './router'
import store from './store'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import DataVVue3 from '@kjgl77/datav-vue3'


import highcharts from 'highcharts'
import highcharts3d from 'highcharts/highcharts-3d'

highcharts3d(highcharts)

const app = createApp(App)
app.use(store)
app.use(router)
app.use(DataVVue3)
app.use(ElementPlus)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

import './styles/animate.min.css'
import "nprogress/nprogress.css"
import "normalize.css";
import 'virtual:windi.css'

import './styles/main.css'


import "amfe-flexible/index.js";

import "./permission"
// 单个自定义指令使用方式
import permission from "~/directives/permission.js"
app.use(permission)

// 集中式管理自定义指令方式（自定义指令处理时间方式）
import registerDirreactives from '~/directives/directive'
registerDirreactives(app)

// 插件的形式处理时间方式
import filterTimes from "~/composables/filterTime";
filterTimes(app);
// store.dispatch('init')


app.mount('#app')
